﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>数据管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
    <meta content="MyraStudio" name="author" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <!-- App favicon -->
    <link rel="shortcut icon" href="assets/images/favicon.ico">

    <!-- App css -->
    <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/theme.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/step.css" rel="stylesheet" type="text/css" />
    <link href="/assets/layui/css/transfer.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/bootstrap-table.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />
    <style>
        .login-user {
            display: flex;
            color: #000;
            line-height: 30px;
        }

        .login-user input {
            /* height: 30px; */
            border-radius: 4px;
            margin: 0px 4px;
        }

        .login-user select {
            /* height: 30px; */
            border-radius: 4px;
            margin: 0px 4px;
            width: 20px;
        }

        .colStyle {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
    </style>
</head>

<body>

    <!-- Begin page -->
    <div id="layout-wrapper">
        <div class="container-fluid" style="margin-top: 10px;">

            <!-- start page title -->
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <div class="card-body">

                            <h4 class="card-title">数据开放接口配置</h4>

                            <button class="layui-btn" onclick="createApiModel()">新增</button>
                            <br></br>

                            <table id="table_page" class="table mb-0">

                            </table>

                        </div> <!-- end card body-->
                    </div> <!-- end card -->
                </div><!-- end col-->
            </div>
            <!-- end row-->


        </div> <!-- container-fluid -->

    </div>
    <!-- END layout-wrapper -->

    <!-- Add model -->
    <div id="apiModal" class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog"
        aria-labelledby="apiModalLabel" style="display: none;">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <!--模态框的头部内容-->
                <div class="modal-header">

                    <h4 class="modal-title" id="apiModalLabel">新增数据开放接口</h4>
                </div>
                <!--模态框的主体内容-->

                <div class="layui-fluid">
                    <div class="layui-card">
                        <div class="layui-card-body" style="padding-top: 40px;">
                            <div class="layui-carousel" id="stepForm" lay-filter="stepForm" style="margin: 0 auto;">
                                <div carousel-item class="layui-form" lay-filter="api">
                                    <div>
                                        <form class="layui-form"
                                            style="margin: 0 auto;max-width: 460px;padding-top: 40px;">

                                            <div class="layui-form-item">
                                                <label class="layui-form-label"
                                                    style="white-space: nowrap;">接口用途:</label>
                                                <div class="layui-input-block  login-user">
                                                    <input type="text" name="comment" placeholder="输入接口用途"
                                                        class="layui-input" />
                                                </div>
                                            </div>

                                            <div class="layui-form-item">
                                                <label class="layui-form-label"
                                                    style="white-space: nowrap;">访问口令:</label>
                                                <div class="layui-input-block  login-user">
                                                    <div class="layui-inline" style="width:440px">
                                                        <input type="text" id="key" name="key" placeholder="请输入"
                                                            lay-filter="key" lay-verify="required" class="layui-input"
                                                            disabled />
                                                    </div>
                                                    <div class="layui-inline">
                                                        <input type="button" class="layui-btn " id="create_key"
                                                            value="生成" onclick="createRandomKey()"></button>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="layui-form-item">
                                                <label class="layui-form-label"
                                                    style="white-space: nowrap;">有效时长:</label>
                                                <div class="layui-input-block login-user">
                                                    <input type="number" id="expired_value" name="expired_value"
                                                        placeholder="请输入" lay-filter="expired_value" min="0"
                                                        onkeypress="return (/[\d\.]/.test(String.fromCharCode(event.keyCode)))"
                                                        lay-verify="required" class="layui-input" required />
                                                    <select id="expired_select" name="expired_select"
                                                        lay-verify="required" lay-filter="expired_select">
                                                        <option value=""></option>
                                                        <option value="min">分钟</option>
                                                        <option value="hour">小时</option>
                                                        <option value="day">天</option>
                                                        <option value="month">月</option>
                                                        <option value="year">年</option>
                                                        <option value="FV">永久</option>
                                                    </select>
                                                </div>
                                            </div>


                                            <div class="layui-form-item" style="text-align: right">
                                                <div class="layui-input-block">
                                                    <button class="layui-btn" lay-submit lay-filter="formStep">
                                                        &emsp;下一步&emsp;
                                                    </button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>

                                    <div>
                                        <form class="layui-form" style="margin: 0 auto">
                                            <div class="layui-form-item">
                                                <label class="layui-form-label" style="white-space: nowrap;">使能:</label>
                                                <div class="layui-input-block">
                                                    <input type="checkbox" name="database_close" id="database_close"
                                                        lay-filter="database_close" lay-skin="switch" lay-text="启用|禁用">
                                                </div>
                                            </div>
                                            <div class="layui-form-item" id="database_transfer_div"
                                                style="display: none;">
                                                <div id="database_transfer" class="demo-transfer"
                                                    style=" text-align: center"></div>
                                            </div>


                                            <div class="layui-form-item" style="text-align: right">
                                                <div class="layui-input-block">
                                                    <button type="button"
                                                        class="layui-btn layui-btn-primary pre">上一步</button>
                                                    <button class="layui-btn" lay-submit lay-filter="formStep2"
                                                        lay-demoTransferActive="getDataDatabase">
                                                        &emsp;确认&emsp;
                                                    </button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>

                                    <div>
                                        <form class="layui-form" style="margin: 0 auto;">
                                            <div class="layui-form-item">
                                                <label class="layui-form-label" style="white-space: nowrap;">使能:</label>
                                                <div class="layui-input-block">
                                                    <input type="checkbox" name="files_path_close" lay-skin="switch"
                                                        lay-filter="files_path_close" lay-text="启用|禁用">
                                                </div>
                                            </div>
                                            <div class="layui-form-item" id="files_path_transfer_div"
                                                style="display: none;">
                                                <div id="files_path_transfer" class="demo-transfer"
                                                    style=" text-align: center"></div>
                                            </div>

                                            <div class="layui-form-item" style="text-align: right">
                                                <div class="layui-input-block">
                                                    <button type="button"
                                                        class="layui-btn layui-btn-primary pre">上一步</button>
                                                    <button class="layui-btn" lay-submit lay-filter="formStep3"
                                                        lay-demoTransferActive="getDataFiles">
                                                        &emsp;确认&emsp;
                                                    </button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>

                                    <div>
                                        <div style="text-align: center;margin-top: 90px;">
                                            <i class="layui-icon layui-circle"
                                                style="color: white;font-size:30px;font-weight:bold;background: #52C41A;padding: 20px;line-height: 80px;">&#xe605;</i>
                                            <div style="font-size: 24px;color: #333;font-weight: 500;margin-top: 30px;">
                                                填写完成
                                            </div>

                                            <div style="text-align: center;margin-top: 50px;">
                                                <button class="layui-btn next">返回</button>
                                                <button class="layui-btn layui-btn-primary"
                                                    id="testSubmitBtn">录入</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--模态框的尾部内容-->
                </div>

            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>
    <!-- END model -->

    <!-- 数据库访问 model -->
    <div id="databaseModal" class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog"
        aria-labelledby="databaseModalLabel" style="display: none;">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <!--模态框的头部内容-->
                <div class="modal-header">
                    <h4 class="modal-title" id="databaseModalLabel">数据库访问修改</h4>
                </div>
                <!--模态框的主体内容-->
                <div class="layui-fluid">
                    <div class="layui-card">
                        <div class="layui-card-body" style="padding-top: 40px;">
                            <div carousel-item class="layui-form" lay-filter="database_tables_modify_form">
                                <div>
                                    <form class="layui-form" style="margin: 0 auto">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="white-space: nowrap;">使能:</label>
                                            <div class="layui-input-block">
                                                <input type="checkbox" name="database_close_modify" id="database_close_modify"
                                                    lay-filter="database_close_modify" lay-skin="switch" lay-text="启用|禁用">
                                            </div>
                                        </div>
                                        <div class="layui-form-item" id="database_transfer_div_modify">
                                            <div id="database_transfer2" class="demo-transfer"
                                                style=" text-align: center"></div>
                                        </div>
                                        <div class="layui-form-item" style="text-align: right">
                                            <div class="layui-input-block">
                                                <button class="layui-btn" id="modify_button_1" name="modify_button_1"
                                                    lay-filter="modify_button_1"
                                                    lay-demoTransferActive="database_tables_modify">
                                                    &emsp;确认&emsp;
                                                </button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>
    <!-- END model -->

    <!-- 数据文件访问 model -->
    <div id="filesModal" class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog"
        aria-labelledby="filesModalLabel" style="display: none;">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <!--模态框的头部内容-->
                <div class="modal-header">
                    <h4 class="modal-title" id="filesModalLabel">数据文件访问修改</h4>
                </div>
                <!--模态框的主体内容-->
                <div class="layui-fluid">
                    <div class="layui-card">
                        <div class="layui-card-body" style="padding-top: 40px;">
                            <div carousel-item class="layui-form" lay-filter="files_path_modify_form">
                                <div>
                                    <form class="layui-form" style="margin: 0 auto">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="white-space: nowrap;">使能:</label>
                                            <div class="layui-input-block">
                                                <input type="checkbox" name="files_path_close_modify" id="files_path_close_modify" lay-skin="switch"
                                                    lay-filter="files_path_close_modify" lay-text="启用|禁用">
                                            </div>
                                        </div>
                                        <div class="layui-form-item" id="files_path_transfer_div_modify">
                                            <div id="files_path_transfer2" class="demo-transfer"
                                                style=" text-align: center"></div>
                                        </div>
                                        <div class="layui-form-item" style="text-align: right">
                                            <div class="layui-input-block">
                                                <button class="layui-btn" id="modify_button_2" name="modify_button_2"
                                                    lay-filter="modify_button_2"
                                                    lay-demoTransferActive="files_path_modify">
                                                    &emsp;确认&emsp;
                                                </button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>
    <!-- END model -->

    <!-- Overlay-->
    <div class="menu-overlay"></div>


    <script>
        var ipm = '[[${manageIp}]]';
    </script>
    <!-- jQuery  -->
    <script src="/assets/js/jquery.min.js"></script>
    <script src="/assets/js/bootstrap.bundle.min.js"></script>
    <script src="/assets/js/metismenu.min.js"></script>
    <script src="/assets/js/waves.js"></script>
    <script src="/assets/js/simplebar.min.js"></script>
    <script src="/assets/layui/layui.js"></script>
    <script src="/assets/js/bootstrap-table.js"></script>
    <script src="/assets/js/bootstrap-table-zh-CN.js"></script>
    <script src="/assets/js/bootstrap-editable.js"></script>
    <script src="/assets/js/bootstrap-table-editable.js"></script>
    <script src="/assets/js/step.js"></script>
    <script src="/assets/js/xm-select.js"></script>
    <!-- Morris Js-->
    <script src="/assets/plugins/morris-js/morris.min.js"></script>
    <!-- Raphael Js-->
    <script src="/assets/plugins/raphael/raphael.min.js"></script>

    <!-- Chart Js-->
    <script src="/assets/plugins/jquery-knob/jquery.knob.min.js"></script>

    <!-- Morris Custom Js-->
    <script src="/assets/pages/open-api-demo.js"></script>
    <script src="/assets/pages/arrowall.js"></script>

    <!-- App js -->
    <script src="/assets/js/theme.js"></script>

</body>

</html>